#!/bin/sh
# Created on 20100622 by Jimmy Wu
# Prints the coordinates of the solution vertices
#
# Arguments:
#   $1:	matrix
#   $2: intersections
# Dependencies:
#   ilp_rows

usage() {
    echo "Usage: $(basename $0) matrix_file intersections_file"
}

if [ $# -lt 2 ] ; then
    usage >&2
    exit 1;
fi

matrix="$1"
intersections="$2"

ilp_rows "$matrix" | paste - "$intersections" | grep '^1' | cut --complement -f1
